<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   xmlns:pe="http://primefaces.org/ui"
   template="/WEB-INF/templates/public/default.xhtml">
   
   	<f:metadata>
	   	<f:viewParam name="bulletinId" value="#{bulletinHome3.id}"></f:viewParam>
	   	<f:event listener="#{bulletinHome3.initConversation()}" type="preRenderView"></f:event>
   	</f:metadata>
   	
   	<ui:define name="head">
   		<style type="text/css">
   			.buletin_title h1{
  				padding: 10px 0 16px 0;
			    font-size: 22px;
			    color: #134c88;
			    text-align: center;
   			}
   			.bulletin_top {
			    margin: 0 auto;
			    border-bottom: 2px solid #ededed;
			}
   			.bulletin_top_cont {
			    margin: 0px 0;
			    padding: 10px;
			}
			
			.label {
				background-color:#f5f8fb;
				width:200px;
				line-height:30px;	
				color: #333;
				text-align: right;
				padding-right:20px;
				text-align: right;
			}
			
			.value {
				font-style:normal;
				font-size: 16px;
				line-height:30px;
				color:#666666;				
				text-align:left;
				padding-left:20px;
				width: 80%;
			}
   			.rowStyle{
	   			text-align: center;
	   			font-size:16px
   			}
   			
   		</style>
   		<script >
			function redirect(){
				var host = window.location.host;
				window.location.href = "http://"+host+"/business/supplier/UnapplyTradeList.xhtml"
		    }
   		</script>
   	</ui:define>
   	
   	<ui:define name="content">
   		<h:form>
			<p:messages
				id="messages"
				closable="true">
				<p:autoUpdate />
			</p:messages>
			<div class="sub_wrap">
				<div class="Methbox_tit">
					<h2>#{param.bulletinTitle != null ? param.bulletinTitle :"招标公告"}</h2>
				</div>
				<div class="Methbox_con">
					<div class="sub_time">
						<div class="fleft">
							报名结束时间：<strong><span class="red">
								<h:outputText
									value="${bulletinHome3.instance.endingApplyTime}"
								>
									<f:convertDateTime pattern="yyyy-MM-dd HH:mm" />
								</h:outputText>
							</span></strong>
						</div>
						<div class="fright">
							参加报名中介数：<strong><span class="red">#{bulletinHome3.instance.hasAppliedCount}</span></strong>
						</div>
					</div>
				
					<div class="sub_view">
						<h2>#{param.title}</h2>
						<p:outputPanel rendered="#{request.isUserInRole('supplier')}" id="applyPanel">
							<p:commandButton rendered="#{bulletinHome3.canApply()}" update="applyPanel" action="#{bulletinHome3.applyTrade()}" value="我要报名" oncomplete="redirect()">
								<f:param name="bulletinId" value="#{bulletinHome3.id}"></f:param>
							</p:commandButton>
						</p:outputPanel>	
						<div class="view_dem">
							<div class="fleft">
								项目服务编号：<span class="blue">#{bulletinHome3.instance.serialNumber}</span>
							</div>
							<div class="fright">
								发布日期：
								<h:outputText value="#{bulletinHome3.instance.auditTime}">
									<f:convertDateTime pattern="yyyy-MM-dd"/>
								</h:outputText>						
							</div>
						</div>
					</div>

					<p>
						我中心将于
							<h:outputText value="#{bulletinHome3.instance.chooseTime}" style="font-weight:bold" >
								<f:convertDateTime pattern="yyyy-MM-dd HH:mm"/>
							</h:outputText>
							, 为 <b>#{bulletinHome3.instance.buyer.cnname}</b> 公开 #{bulletinHome3.instance.wayOfChoose.typeName} 选取#{bulletinHome3.instance.qualificationTemplate.qualificationClass.name}中介服务机构,现将相关事项公告如下：
						
					</p>
					
					<ui:include src="/WEB-INF/templates/public/bulletinCommonInfo.xhtml" />
					<p>
						东营市网上中介超市已经向中介企业库符合条件的中介机构联系人手机发送公告信息，中介机构可登录我的工作台进行报名或报价。
					</p>
					<div style="text-align: right">
						东营市网上中介超市 <br/>
						<h:outputText value="#{bulletinHome3.instance.auditTime}">
							<f:convertDateTime pattern="yyyy年MM月dd日"/>
						</h:outputText>
					</div>
				</div>
			</div>
		</h:form>							
	</ui:define>
</ui:composition>
